package com.taotao.sys.controller;

import com.taotao.common.RespData;
import com.taotao.common.annotation.CurrUserId;
import com.taotao.sys.entity.SysUser;
import com.taotao.sys.service.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;


/**
 * <p>
 * 账号表控制器
 * </p>
 *
 * @author Fan Beibei
 * @version V1.0
 * @since 2025-05-18 23:03:09
 */
@Slf4j
@Api(tags = "账号表接口")
@RestController
@RequestMapping("/sys/user")
public class SysUserController {

    @Autowired
    private SysUserService sysUserService;


    @ApiOperation(value = "根据ID查询", notes = "")
    @ResponseBody
    @GetMapping("/queryById")
    public RespData<SysUser> queryById(@RequestParam("id") java.lang.Long id) {

//        SysUser sysUser = sysUserService.queryById(id);

        return RespData.successResp();

    }


    @ApiOperation(value = "批量删除", notes = "")
    @ResponseBody
    @PostMapping("/batchDel")
    public RespData<Integer> batchDel(@RequestBody Set<java.lang.Long> ids, @CurrUserId Long userId) {

//        int effectCount = sysUserService.softDelByIds(ids, userId);

        return RespData.successResp();

    }


    @ApiOperation(value = "新增或更新", notes = "")
    @ResponseBody
    @PostMapping("/addOrUpdate")
    public RespData<java.lang.Long> addOrUpdate(@RequestBody SysUser param, @CurrUserId Long userId) {

//        java.lang.Long id = sysUserService.addOrUpdate(param, userId);

        return RespData.successResp();

    }


}
